package routers

import (
	"github.com/astaxie/beego"
	"helloworld/controllers"
)

func init() {
	beego.Router("/", &controllers.MainController{})
	beego.Router("/goods", &controllers.GoodsController{})
	beego.Router("/active", &controllers.ActiveController{}, "get:Active")
	beego.Router("/active/edit", &controllers.ActiveController{}, "get:EdicActive")
	//user
	beego.Router("/user/addUser", &controllers.UsersController{}, "get:AddUser")
	beego.Router("/user/doAdd", &controllers.UsersController{}, "post:DoAddUser")
	beego.Router("/user/editUser", &controllers.UsersController{}, "get:EditUser")
	beego.Router("/user/doEdit", &controllers.UsersController{}, "post:DoEditUser")
	beego.Router("/user/getUser", &controllers.UsersController{}, "get:GetUser")

	beego.Router("/goods/Xml", &controllers.GoodsController{}, "post:Xml")
	//beego.Router("/goods/RController/:id", &controllers.GoodsController{}, "get:RController")
	//beego.Router("/goods/RController/:id([0-9]+).", &controllers.GoodsController{}, "get:RController")

	beego.Router("/login", &controllers.LoginController{})
	beego.Router("/login/do", &controllers.LoginController{}, "post:DoLogin")
}
